unit TUMLISTE1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, StdCtrls, jpeg, ExtCtrls, Grids, DBGrids;

type
  TFRMTUMLISTE1 = class(TForm)
    Label2: TLabel;
    DBGrid1: TDBGrid;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Image1: TImage;
    Image2: TImage;
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    Button9: TButton;
    Button10: TButton;
    Button11: TButton;
    Button12: TButton;
    Button13: TButton;
    Button14: TButton;
    Button15: TButton;
    Button16: TButton;
    Button17: TButton;
    Button18: TButton;
    SORGU: TADOQuery;
    SORGUOGRENCI_NO: TStringField;
    SORGUCINSIYET: TStringField;
    SORGUADI_SOYADI: TStringField;
    SORGUFAKULTE: TStringField;
    SORGUBOLUM: TStringField;
    SORGUSINIF: TStringField;
    DataSource1: TDataSource;
    SORGUODA_NUMARASI: TStringField;
    Button19: TButton;
    Button20: TButton;
    Button21: TButton;
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
    procedure Button10Click(Sender: TObject);
    procedure Button12Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button7Click(Sender: TObject);
    procedure Button9Click(Sender: TObject);
    procedure Button11Click(Sender: TObject);
    procedure Button13Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button18Click(Sender: TObject);
    procedure Button17Click(Sender: TObject);
    procedure Button16Click(Sender: TObject);
    procedure Button15Click(Sender: TObject);
    procedure Button14Click(Sender: TObject);
    procedure DBGrid1DblClick(Sender: TObject);
    procedure Button19Click(Sender: TObject);
    procedure Button20Click(Sender: TObject);
    procedure Button21Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRMTUMLISTE1: TFRMTUMLISTE1;

implementation

uses ANAMENU, BAGLANTI, KAYIT;

{$R *.dfm}

procedure TFRMTUMLISTE1.Button3Click(Sender: TObject);
begin
BUTTON18.Visible:=TRUE;
BUTTON17.Visible:=TRUE;
BUTTON16.Visible:=TRUE;
BUTTON15.Visible:=TRUE;
BUTTON14.Visible:=TRUE;
BUTTON21.Visible:=TRUE;
BUTTON4.Visible:=FALSE;
BUTTON5.Visible:=FALSE;
BUTTON6.Visible:=FALSE;
BUTTON7.Visible:=FALSE;
BUTTON8.Visible:=FALSE;
BUTTON9.Visible:=FALSE;
BUTTON10.Visible:=FALSE;
BUTTON11.Visible:=FALSE;
BUTTON12.Visible:=FALSE;
BUTTON13.Visible:=FALSE;
BUTTON20.Visible:=FALSE;
BUTTON19.Visible:=FALSE;
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('ORDER BY ADI_SOYADI ASC');
SORGU.Open;
label2.Caption:='KAYITLI OGRENCI'+' '+' '+INTTOSTR(SORGU.RECORDCOUNT)

end;

procedure TFRMTUMLISTE1.Button1Click(Sender: TObject);
begin
    BUTTON4.Visible:=TRUE;
BUTTON6.Visible:=TRUE;
BUTTON8.Visible:=TRUE;
BUTTON10.Visible:=TRUE;
BUTTON12.Visible:=TRUE;
BUTTON19.Visible:=TRUE;
BUTTON14.Visible:=FALSE;
BUTTON15.Visible:=FALSE;
BUTTON16.Visible:=FALSE;
BUTTON17.Visible:=FALSE;
BUTTON18.Visible:=FALSE;
BUTTON5.Visible:=FALSE;
BUTTON7.Visible:=FALSE;
BUTTON9.Visible:=FALSE;
BUTTON11.Visible:=FALSE;
BUTTON13.Visible:=FALSE;
BUTTON20.Visible:=FALSE;
BUTTON21.Visible:=FALSE;
 SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.Open;
label2.Caption:='KAYITLI OGRENCI'+' '+' '+INTTOSTR(SORGU.RECORDCOUNT)

end;

procedure TFRMTUMLISTE1.Button2Click(Sender: TObject);
begin
BUTTON5.Visible:=TRUE;
BUTTON7.Visible:=TRUE;
BUTTON9.Visible:=TRUE;
BUTTON11.Visible:=TRUE;
BUTTON20.Visible:=TRUE;
BUTTON13.Visible:=TRUE;
BUTTON14.Visible:=FALSE;
BUTTON15.Visible:=FALSE;
BUTTON16.Visible:=FALSE;
BUTTON17.Visible:=FALSE;
BUTTON18.Visible:=FALSE;
BUTTON4.Visible:=FALSE;
BUTTON6.Visible:=FALSE;
BUTTON8.Visible:=FALSE;
BUTTON10.Visible:=FALSE;
BUTTON12.Visible:=FALSE;
BUTTON19.Visible:=FALSE;
BUTTON21.Visible:=FALSE;
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.Open;
label2.Caption:='KAYITLI OGRENCI'+' '+' '+INTTOSTR(SORGU.RECORDCOUNT)

end;

procedure TFRMTUMLISTE1.Button4Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY OGRENCI_NO ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button6Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF ,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY ADI_SOYADI ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button8Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF ,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY FAKULTE ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button10Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF ,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY BOLUM ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button12Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY SINIF ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button5Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY OGRENCI_NO ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button7Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY ADI_SOYADI ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button9Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY FAKULTE ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button11Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY BOLUM ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button13Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY SINIF ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  FRMANAMENU.Show;
      HIDE;
end;

procedure TFRMTUMLISTE1.Button18Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF ,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY OGRENCI_NO ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button17Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY ADI_SOYADI ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button16Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY FAKULTE ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button15Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY BOLUM ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button14Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY SINIF ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.DBGrid1DblClick(Sender: TObject);
begin
MODUL.ANATABLO.Filter:='OGRENCI_NO='+ QUOTEDSTR(SORGU.FIELDBYNAME('OGRENCI_NO').AsString);
MODUL.ANATABLO.Filtered:=TRUE;
FRMKAYIT.Show;
end;

procedure TFRMTUMLISTE1.Button19Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY ODA_NUMARASI ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button20Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT2.Text));
SORGU.SQL.Add('ORDER BY ODA_NUMARASI ASC');
SORGU.Open;
end;

procedure TFRMTUMLISTE1.Button21Click(Sender: TObject);
begin
SORGU.Close;
SORGU.SQL.Clear;
SORGU.SQL.Add('SELECT OGRENCI_NO,ADI_SOYADI,CINSIYET,FAKULTE,BOLUM,SINIF,ODA_NUMARASI FROM ANATABLO');
//SORGU.SQL.Add('WHERE CINSIYET='+QUOTEDSTR(EDIT1.Text));
SORGU.SQL.Add('ORDER BY ODA_NUMARASI ASC');
SORGU.Open;
end;

end.
